@ECHO OFF
@REM Setting Environment
@SET VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\
@CALL "%VS_PATH%\VC\vcvarsall.bat" x86
@ECHO %date% %time% Start Building Solution
@REM Build Solution
devenv DispatchAssist.sln /build Release
@REM Copy Release


DEL /S/F/Q .\Release\ACARSSendService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\ACARSSendService

DEL /S/F/Q .\Release\SMSSendService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\SMSSendService

DEL /S/F/Q .\Release\CommonAlertCreateService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\CommonAlertCreateService

DEL /S/F/Q .\Release\SMSAlertCreateService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\SMSAlertCreateService

DEL /S/F/Q .\Release\ACARSMsgCreateService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\ACARSMsgCreateService

DEL /S/F/Q .\Release\SMSMsgCreateService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\SMSMsgCreateService

DEL /S/F/Q .\Release\DMMSUpdateService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\DMMSUpdateService

DEL /S/F/Q .\Release\MeteoParseService
XCOPY /E/X/Y/I .\BasicWinService\bin\Release .\Release\MeteoParseService

DEL /S/F/Q .\Release\Client
XCOPY /E/X/Y/I .\AppHost\bin\Release .\Release\Client

DEL /S/F/Q .\Release\WebService
XCOPY /E/X/Y/I .\WebService\bin .\Release\WebService

@REM Clean Release
forfiles.exe /P .\Release  /S /M *.pdb /C "CMD /C DEL /S @PATH"